import axios from "axios";

// 用户注册
export const getZc = (data: string) => {
  return axios({
    url: "http://localhost:12345/api/user/register",
    method: "post",
    data,
  });
};

// 用户登录
export const getLogin = (data: string) => {
  return axios({
    url: "http://localhost:12345/api/user/login",
    method: "post",
    data,
  });
};

//高德地图
export const getGd = () => {
  return axios({
    url: "https://restapi.amap.com/v3/ip?ip=114.247.50.2&output=xml&key=e785af8b5897fb366d438658f263d112",
    method: "post",
  });
};

// 首页渲染
export const getHome = () => {
  return axios({
    url: "http://localhost:12345/api/show/indexList",
    method: "get",
  });
};

// 列表页
export const getList = () => {
  return axios({
    url: "http://localhost:12345/api/show/listList",
    method: "get",
  });
};

// 展览详情
export const getZlxq = (id: any) => {
  return axios({
    url: "http://localhost:12345/api/show/detail/" + id,
    method: "get",
    params: {
      id,
    },
  });
};
